#ifndef CONNECTPAGE_H
#define CONNECTPAGE_H

#include <QWidget>


#include "GReader.h"
#include "message.h"
#include "delegate.h"

enum
{
    Connected = 0,
    Disconnected
};

namespace Ui {
class ConnectPage;
}

class ConnectPage : public QWidget
{
    Q_OBJECT

public:
    explicit ConnectPage(QWidget *parent = nullptr);
    ~ConnectPage();

    static ConnectPage *myPage ; //用于回调函数向外发射信号

    GClient *gclient ; //用于创建TCP连接，并供其他页面使用
    static void __stdcall TcpDisconnecte(char *msg);
    static void __stdcall TagEpcLog(char* readerName, LogBaseEpcInfo msg);

    static int  DevConnectState;//记录连接状态
    int GetConnectState(void);

signals:
    void ReadTagRetuenData(LogBaseEpcInfo str);      //向外部的类发送信号


private slots:
    void on_confirm_button_clicked();

private:
    Ui::ConnectPage *ui;
};

#endif // CONNECTPAGE_H
